package com.kungfuhacking.wristbandpro.mqtt;

/**
 * Created by Aaron on 17/5/16.
 */

public class MqttConstant {

    //数据库名称
    public static final String DB_NAME = "ckmqtt.db";
    //聊天记录表
    public static final String HISTORY_TABLE = "chatHistory";
    //订阅的主题表  和 聊天的最新的一条记录表
    public static final String TOPIC_TABLE = "topics";
    /**
     * 手机号
     */
    public final static String USERID = "USERID";//存的是用户手机号
    public static final int CHAT_HISTORY_COUNT = 20;//聊天历史查询的个数

    static String[] TOPICS;//需要订阅的topics

    static final int MQTT_QOS_ONCE = 1;//mqtt qos
    public static final int MQTT_QOS_SUB = 1;//mqtt qos

    //////////////////////       信息发送类型     ////////////////////
    public static final String MQTTMESSAGETEXT = "Text";//文本
    public static final String MQTTMESSAGEPHOTO = "Picture";//图片
    public static final String MQTTMESSAGEVOICE = "Voice";//语音
    public static final String MQTTMESSAGETODO = "Todo";//网页代办
    public static final String MQTTMESSAGENOTICE = "Notice";//通知, 创建群, 删人 加人

    public final static String MQTTNOTCONNECT = "MQTTNOTCONNECT";//mqtt未连接

    /**
     * messagebean 字段中 operationStyle 的类型
     */
    public static final String DELETE_RECENT_HISTORY = "DELETE_RECENT_HISTORY";//删除最近聊天记录code
    public static final String OFF_GROUP = "OFF_GROUP";//退出群,删除人的code
    public static final String RECEIVE_MESSAGE = "RECEIVE_MESSAGE";//接受到新消息

    //    public static final String TOPIC_MAP = "TOPIC_MAP";//保存到sp中的 topicName 和 topicPic
    public static final String UPDATE_RED_COUNT = "UPDATE_RED_COUNT";//通知底部状态栏更新小红点个数

//    public static Map<String, TopicBean> topicMap;//

    public static String currentContractTopic = "";//当前聊天的id

    public static final int UNLISTENER = 0;//语音未读取状态
    public static final int LISTENERED = 1;//语音读取过的状态

    public static final String DELETEEMO = "[delete]";

    static final String SUB = "sub";
    static final String UN_SUB = "unsub";

    //    public static final String START_SINGLE = "/f/";//单聊
//    public static final String START_GROUP = "/g/";//群聊
//    public static final String START_CHILD = "/c/";//家庭圈 // 圈子
    public static final String START_S = "/s/";//系统 显示
    public static final String START_SYSTEM = "/system/";//系统 (不显示) sub unsub

    /**
     * 新消息是否提醒 1 不提醒, 默认提醒 (默认为0)
     */
    public static final String REMAIND = "REMAIND";//1
    //新建隐藏文件夹
    public final static String PHOTO_PATH_HINT = "/.YBRACELETPEOCACHE";

    final static String MQTTIP = "MQTTIP"; //mqtt登录ip
    final static String MQTTPORT = "MQTTPORT"; //mqtt登录端口

    public static final int EMO_PAGE_ONE = 0;
    public static final int EMO_PAGE_TWO = 1;
    public static final int EMO_PAGE_THREE = 2;

    public static final int CREATE_GROUP = 0x121;//创建群聊
    public static final int DELETE_GROUP_NUMS = 0x122;//删除群成员
    public static final int ADD_GROUP_NUMS = 0x123;//添加群成员

    /**
     * 对方是否接受到发送的消息
     */
    public static final int MESSAGE_SENDING = 1;//消息发送中
    public static final int MESSAGE_SEND_FAIL = -1;//消息发送失败
    public static final int MESSAGE_SEND_SUCCESS = 0;//消息发送成功

    //是否30秒一次检查mqtt连接情况
    public static final String INTERVAL_CONNET_MQTT = "INTERVAL_CONNET_MQTT";


}